Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21858: 'Merge All Contacts with the Same Address' doesn't consider Household replace individuals that share same address. #11901

Closed
wants to merge 1 commit into from

Conversation

monishdeb
Copy link
Member

@monishdeb monishdeb commented Mar 29, 2018

Overview

Consider 3 contacts A,B, C where A and B individuals share same address. C is a household whose member is A. On export following is what is expected and how the current scenario works before the fix

Expected: 1 record which is C, A and B share the same address so that should be merged into 1 contact but then A is also a member of C so C take precedence over A. So at the end, only C should be exported.
Actual: 2 records i.e. combined record of (A & B), C (Incorrect)

Before

Contain 2 records as described Actual scenario

After

Export result contains Household C


@monishdeb
Copy link
Member Author

ping @lcdservices

@monishdeb monishdeb changed the title CRM-21858: 'Merge All Contacts with the Same Address' doesn't conside…r Household replace individuals that share same address. CRM-21858: 'Merge All Contacts with the Same Address' doesn't consider Household replace individuals that share same address. Mar 29, 2018
@lcdservices
Copy link
Contributor

@monishdeb this isn't right. The distinguishing factor is not whether they share an address, but whether a household relationship exists.

  • Indiv A and Indiv B have the same address and are joined to Household C
  • Currently, merge same address results in A+B exported as a single record and C also exported
  • What should happen is that only Household C be exported

Merge same address gives preference to the existence of a household relationship. It is intended as an extension of the "merge household" function -- it looks for contacts not connected by a household and merges them AND also merges via household.

I think the confusion is with the help text:

Merge Contacts with the Same Address will combine any records having the same address (street address, city, postal code, country) into a single record. If a household record already exists in which multiple individuals share an address, the household will be exported as the combined record. If no household record exists, the records will be combined and the Addressee field will list the contact names, comma-separated.

The phrase "in which multiple individuals share an address" was not intended to be interpreted as referring to the share address functionality. It was intended to mean, if two individuals have the same address and have a household relationship, the household record will be exported.

To put it another way -- the goal of these two tools is to allow orgs to collapse records down and reduce mailing costs. Merge household does that strictly -- there must be a household relationship present. Merge address does it more dynamically (extends the functionality) -- if a household record exists, we use that; but if it doesn't, we try to collapse/merge them down based on matching addresses.

@eileenmcnaughton
Copy link
Contributor

this would need a test

@monishdeb monishdeb force-pushed the CRM-21858 branch 3 times, most recently from 5daf1dc to b61713b Compare April 2, 2018 11:19
@monishdeb
Copy link
Member Author

monishdeb commented Apr 2, 2018

@eileenmcnaughton @lcdservices I have updated the PR which is dependent on #11870 changes. The reason why I have to cherrpick the commit from previous, and do the change on the top of it. Also updated the description and added UT. Please have look :)

@lcdservices
Copy link
Contributor

@monishdeb ran some tests and this looks good -- contacts are now merged into households if those relationships exist.

… Members into their Households" produces db error
@monishdeb
Copy link
Member Author

jenkins test this please

@eileenmcnaughton
Copy link
Contributor

@monishdeb I'm going to close this one out until we have resolved #11870

I can't see myself being able to review either of them until we have gotten the code to a state of legibility so I feel these 2 have to be 'longer term projects'

@eileenmcnaughton
Copy link
Contributor

(as an aside - the trick to re-opening as opposed to creating new is to reopen before you force-push)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants